﻿
if (typeof ($) != "undefined") {
    $(document).ready(function () {
        //加载所有菜单信息 目前只加载人力资源菜单（排除不显示的菜单）
        $("#FunctionID").find('option').remove();
        var url = "../Extend/AjaxData/jsonlist.aspx?entity=SysFunction&condition=url!='' order by FunctionPath";
        $.get(url, function (d, s) {
            var list = eval("(" + d + ")");
            if (list.total == 0) {
                //无数据
            }
            else {
                for (var o in list.rows) {
                    var v = list.rows[o].FunctionId;
                    var t = list.rows[o].Name;
                    if (typeof (t) != "undefined") {
                        $("#FunctionID").append("<option value='" + v + "' title='" + t + "'>" + t + "</option>");
                    }
                }
                if (getPar(location.href, "id") != "") { //修改时
                    $("#FunctionID").attr("value", instance[0].FunctionID); //
                }
            }
        });
    });
}

//客户端数据验证
var fnCheckData = function () {
    var funId = $("#FunctionID").val();
    if (funId == "" && funId == "undefined") {
        return "请选择模块功能！";
    }
    if ($("#Title").val() == "") {
        return "请输入模块帮助标题！";
    }
    if ($("#HelpContent").val() == "") {
        return "请输入模块帮助内容！";
    }
}